home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /*-------------------- phinter inquire functions ---------------------------*/
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_all_conf_structs()
- {
- Pint arid, i, start, err, totlength, def;
- Pint_list ids;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- arid = readinteger("archive identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_all_conf_structs(arid, 0, start, &err, &ids, &totlength);
- ids.ints = (Pint *)calloc(totlength, sizeof(Pint));
- ids.num_ints = totlength;
- pinq_all_conf_structs(arid, totlength, start, &err, &ids, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "conflicting structures:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &ids, PTKESTRUCTID);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(ids.ints);
- #endif
- } /* do_pinq_all_conf_structs */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_anno_facs()
- {
- Pint wstype, start, err, totlength, i, numcharhts;
- Pint_list styles;
- Pfloat mincharht, maxcharht;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_anno_facs(wstype, 0, start, &err, &styles, &totlength, &numcharhts,
- &mincharht, &maxcharht);
- styles.ints = (Pint *)calloc(totlength, sizeof(Pint));
- pinq_anno_facs(wstype, totlength, start, &err, &styles, &totlength,
- &numcharhts, &mincharht, &maxcharht);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "annotation styles:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &styles, PTKENOTABLE);
- phinprintf(PTKEINFORM, "number of character heights = %d\n",
- numcharhts);
- phinprintf(PTKEINFORM, "minimum character height = %f\n",
- mincharht);
- phinprintf(PTKEINFORM, "maximum character height = %f\n",
- maxcharht);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(styles.ints);
- } /* do_pinq_anno_facs */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_paths_ances()
- {
- Pint stid, depth, err, i, j;
- Ppath_order order;
- Pelem_ref_list_list *paths;
- Pstore store;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- order = readphigsenum(PTKEPATHORDER, "path order ? ");
- depth = readposinteger("path depth ? ");
- pcreate_store(&err, &store);
- pinq_paths_ances(stid, order, depth, store, &err, &paths);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "ancestor paths of structure %d:\n", stid);
- for (i = 0; i < paths->num_elem_ref_lists; i++)
- {
- phinprintf(PTKEINFORM, "path %d:\n", i);
- for (j = 0; j < paths->elem_ref_lists[i].num_elem_refs; j++)
- {
- phinprintf(PTKEINFORM, "structure %d\n",
- paths->elem_ref_lists[i].elem_refs[j].struct_id);
- phinprintf(PTKEINFORM, "element %d\n",
- paths->elem_ref_lists[i].elem_refs[j].elem_pos);
- }
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_paths_ances */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_ar_files()
- {
- char *buffer;
- Pint err, totsize, i, start;
- Par_file_list *arfiles;
- Pstore store;
-
- pinq_ar_files(store, &err, &arfiles);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- for (i = 0; i < arfiles->num_ar_files; i++)
- phinprintf(PTKEINFORM,
- "open archive file [%d], identifier = %d, name = \"%s\"\n",
- i, arfiles->ar_files[i].id, arfiles->ar_files[i].name);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_ar_files */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_ar_st()
- {
- Par_st archivestate;
-
- pinq_ar_st(&archivestate);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- phinprintf(PTKEINFORM, "archive state value = ");
- writephigsenum(PTKEINFORM, PTKEARCHIVESTATE, archivestate);
- }
- } /* do_pinq_ar_st */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_choice_st()
- {
- Pint ws, dev, err, initchoice, pet;
- Pstore store;
- Pin_status status;
- Pecho_switch esw;
- Pop_mode mode;
- Plimit echo;
- Pchoice_data *choicedata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("choice device number ? ");
- pcreate_store(&err, &store);
- pinq_choice_st(ws, dev, store, &err, &mode, &esw, &status, &initchoice,
- &pet, &echo, &choicedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of choice device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial status = ");
- writephigsenum(PTKEINFORM, PTKEISTATUS, status);
- phinprintf(PTKEINFORM, "initial choice = ");
- writeinteger(PTKEINFORM, initchoice);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writechoicerec(PTKEINFORM, dev, pet, choicedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_choice_st */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_choice_st3()
- {
- Pint ws, dev, err, initchoice, pet;
- Pstore store;
- Pin_status status;
- Pecho_switch esw;
- Pop_mode mode;
- Plimit3 echo;
- Pchoice_data3 *choicedata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("choice device number ? ");
- pcreate_store(&err, &store);
- pinq_choice_st(ws, dev, store, &err, &mode, &esw, &status, &initchoice,
- &pet, &echo, &choicedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of choice device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial status = ");
- writephigsenum(PTKEINFORM, PTKEISTATUS, status);
- phinprintf(PTKEINFORM, "initial choice = ");
- writeinteger(PTKEINFORM, initchoice);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writechoicerec3(PTKEINFORM, dev, pet, choicedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_choice_st3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_colr_facs()
- {
- Pint wstype;
- Pint err, i;
- Pcolr_facs facil;
-
- readwstype(&wstype);
- pinq_colr_facs(wstype, &err, &facil);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "colour facilities:\n");
- phinprintf(PTKEINFORM, "number of colours = ");
- writeinteger(PTKEINFORM, facil.num_colrs);
- phinprintf(PTKEINFORM, "colour availability = ");
- writephigsenum(PTKEINFORM, PTKECOAVAIL, facil.colr_avail);
- phinprintf(PTKEINFORM, "number of predefined colour bundles = ");
- writeinteger(PTKEINFORM, facil.num_pred_inds);
- phinprintf(PTKEINFORM, "chromaticity coefficients:\n");
- for (i = 0; i < 3; i++)
- {
- phinprintf(PTKEINFORM, "primary colour [%d]:\n", i);
- phinprintf(PTKEINFORM, "x coefficient = %f\n",
- facil.prim_colrs[i].cieluv_x);
- phinprintf(PTKEINFORM, "y coefficient = %f\n",
- facil.prim_colrs[i].cieluv_y);
- phinprintf(PTKEINFORM, "y luminance = %f\n",
- facil.prim_colrs[i].cieluv_y_lum);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_colr_facs */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_colr_model()
- {
- Pint ws, err, model;
-
- ws = readinteger("workstation identifier ? ");
- pinq_colr_model(ws, &err, &model);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "colour model = ");
- writeinteger(PTKEINFORM, model);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_colr_model */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_colr_model_facs()
- {
- Pint wstype;
- Pint start, err, totlength, def, i;
- Pint_list models;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_colr_model_facs(wstype, 0, start, &err, &models, &totlength, &def);
- models.ints = (Pint *)calloc(totlength, sizeof(Pint));
- models.num_ints = totlength;
- pinq_colr_model_facs(wstype, totlength, start, &err, &models, &totlength,
- &def);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "colour model facilities:\n");
- phinprintf(PTKEINFORM, "colour models:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, models, PTKENOTABLE);
- phinprintf(PTKEINFORM, "default colour model = ");
- writeinteger(PTKEINFORM, def);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(models.ints);
- } /* do_pinq_colr_model_facs */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_colr_rep()
- {
- Pint ws, index, err;
- Pinq_type type;
- Pcolr_rep rep;
-
- ws = readinteger("workstation identifier ? ");
- index = readposintvalue("colour index ? ", PTKECOLOURIND);
- type = readphigsenum(PTKEINQTYPE, "colour type ? ");
- getcolourmodel(ws);
- pinq_colr_rep(ws, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "colour representation:\n");
- writecobundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_colr_rep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_conf_res()
- {
- Pint err;
- Pconf_res archive, retrieval;
-
- pinq_conf_res(&err, &archive, &retrieval);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "archive resolution = ");
- writephigsenum(PTKEINFORM, PTKECONFRES, archive);
- phinprintf(PTKEINFORM, "retrieval resolution = ");
- writephigsenum(PTKEINFORM, PTKECONFRES, retrieval);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_conf_res */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_conf_structs_net()
- {
- Pint arid, stid, totlength, err, start;
- Pstruct_net_source src;
- Pint_list ids;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- arid = readinteger("archive identifier ? ");
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- src = readphigsenum(PTKESTRUCTNETSRC, "structure network source ? ");
- start = readposinteger("starting position ? ");
- pinq_conf_structs_net(arid, stid, src, 0, start, &err, &ids, &totlength);
- ids.ints = (Pint *)calloc(totlength, sizeof(Pint));
- ids.num_ints = totlength;
- pinq_conf_structs_net(arid, stid, src, totlength, start, &err, &ids,
- &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "conflicting structures:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &ids, PTKESTRUCTID);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(ids.ints);
- #endif
- } /* do_pinq_conf_structs_net */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_cur_elem_content()
- {
- Pstore store;
- ptkselcontent elcont;
- Pint err;
-
- pcreate_store(&err, &store);
- ptk_inqcurelemtypesizecontent(store, &err, &elcont);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current element content:\n");
- writeelemcontent(PTKEINFORM, &elcont);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_cur_elem_content */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_cur_elem_type_size()
- {
- Pint err;
- Pelem_type eltype;
- size_t size;
-
- pinq_cur_elem_type_size(&err, &eltype, &size);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current element type = ");
- writephigsenum(PTKEINFORM, PTKEELTYPE, eltype);
- phinprintf(PTKEINFORM, "current element size = ");
- writeinteger(PTKEINFORM, size);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_cur_elem_type_size */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_choice_data()
- {
- Pint wstype, dev, err, i, maxchoice;
- Pstore store;
- Pint_list *pets;
- Plimit echo;
- Pchoice_data *choicedata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_choice_data(wstype, dev, store, &err, &maxchoice, &pets,
- &echo, &choicedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default choice data:\n");
- phinprintf(PTKEINFORM, "maximum number of choices = ");
- writeinteger(PTKEINFORM, maxchoice);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writechoicerec(PTKEINFORM, dev, 1, choicedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_choice_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_choice_data3()
- {
- Pint wstype, dev, err, totsize, i, maxchoice;
- Pstore store;
- Pint_list *pets;
- Plimit3 echo;
- Pchoice_data3 *choicedata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_choice_data3(wstype, dev, store, &err, &maxchoice, &pets, &echo,
- &choicedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default choice data 3:\n");
- phinprintf(PTKEINFORM, "maximum number of choices = ");
- writeinteger(PTKEINFORM, maxchoice);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writechoicerec3(PTKEINFORM, dev, 1, choicedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_choice_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_disp_upd_st()
- {
- Pint wstype, err;
- Pdefer_mode defmode;
- Pmod_mode modmode;
-
- readwstype(&wstype);
- pinq_def_disp_upd_st(wstype, &err, &defmode, &modmode);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "deferral mode = ");
- writephigsenum(PTKEINFORM, PTKEDEFMODE, defmode);
- phinprintf(PTKEINFORM, "modification mode = ");
- writephigsenum(PTKEINFORM, PTKEMOD, modmode);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinq_def_disp_upd_st */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_loc_data()
- {
- Pint wstype, dev, err, i;
- Pstore store;
- Ppoint pos;
- Pint_list *pets;
- Plimit echo;
- Ploc_data locdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_loc_data(wstype, dev, store, &err, &pos, &pets, &echo, &locdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default locator data:\n");
- phinprintf(PTKEINFORM, "initial position:\n");
- writepoint(PTKEINFORM, &pos);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writelocrec(PTKEINFORM, dev, 1, locdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_loc_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_loc_data3()
- {
- Pint wstype, dev, err, totsize, i;
- Pstore store;
- Ppoint3 pos;
- Pint_list *pets;
- Plimit3 echo;
- Ploc_data3 *locdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_loc_data3(wstype, dev, store, &err, &pos, &pets, &echo, &locdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default locator data 3:\n");
- phinprintf(PTKEINFORM, "initial position:\n");
- writepoint3(PTKEINFORM, &pos);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writelocrec3(PTKEINFORM, dev, 1, locdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_loc_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_pick_data()
- {
- Pint wstype, dev, err, i;
- Pstore store;
- Plimit echo;
- Pint_list *pets;
- Ppick_data *pickdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_pick_data(wstype, dev, store, &err, &pets, &echo, &pickdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default pick data:\n");
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writepickrec(PTKEINFORM, dev, 1, pickdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_pick_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_pick_data3()
- {
- Pint wstype, dev, err, totsize, i;
- Pstore store;
- Plimit3 echo;
- Pint_list *pets;
- Ppick_data3 *pickdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_pick_data3(wstype, dev, store, &err, &pets, &echo, &pickdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default pick data 3:\n");
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writepickrec3(PTKEINFORM, dev, 1, pickdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_pick_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_string_data()
- {
- Pint wstype, dev, err, i, maxbufsize;
- Pstore store;
- Pint_list *pets;
- Plimit echo;
- Pstring_data *stringdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_string_data(wstype, dev, store, &err, &maxbufsize, &pets,
- &echo, &stringdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default string data:\n");
- writeinteger(PTKEINFORM, err);
- phinprintf(PTKEINFORM, "maximum buffer size = ");
- writeinteger(PTKEINFORM, maxbufsize);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writestringrec(PTKEINFORM, dev, 1, stringdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_string_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_string_data3()
- {
- Pint wstype, dev, err, i, maxbufsize;
- Pstore store;
- Pint_list *pets;
- Plimit3 echo;
- Pstring_data3 *stringdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_string_data3(wstype, dev, store, &err, &maxbufsize, &pets,
- &echo, &stringdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default string data 3:\n");
- phinprintf(PTKEINFORM, "maximum buffer size = ");
- writeinteger(PTKEINFORM, maxbufsize);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writestringrec3(PTKEINFORM, dev, 1, stringdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_string_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_stroke_data()
- {
- Pint wstype, dev, err, i, maxbufsize;
- Pstore store;
- Pint_list *pets;
- Plimit echo;
- Pstroke_data *strokedata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_stroke_data(wstype, dev, store, &err, &maxbufsize, &pets, &echo,
- &strokedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default stroke data:\n");
- phinprintf(PTKEINFORM, "maximum buffer size = ");
- writeinteger(PTKEINFORM, maxbufsize);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writestrokerec(PTKEINFORM, dev, 1, strokedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_stroke_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_stroke_data3()
- {
- Pint wstype, dev, err, i, maxbufsize;
- Pstore store;
- Pint_list *pets;
- Plimit3 echo;
- Pstroke_data3 *strokedata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_stroke_data3(wstype, dev, store, &err, &maxbufsize, &pets,
- &echo, &strokedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default stroke data 3:\n");
- phinprintf(PTKEINFORM, "maximum buffer size = ");
- writeinteger(PTKEINFORM, maxbufsize);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writestrokerec3(PTKEINFORM, dev, 1, strokedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_stroke_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_val_data()
- {
- Pint wstype, dev, err, i;
- Pstore store;
- Pfloat defval;
- Pint_list *pets;
- Plimit echo;
- Pval_data *valdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_val_data(wstype, dev, store, &err, &defval, &pets, &echo,
- &valdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default valuator data:\n");
- phinprintf(PTKEINFORM, "initial value = ");
- writereal(PTKEINFORM, defval);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writevalrec(PTKEINFORM, dev, 1, valdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_val_data */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_def_val_data3()
- {
- Pint wstype, dev, err, i;
- Pstore store;
- Pfloat defval;
- Pint_list *pets;
- Plimit3 echo;
- Pval_data3 *valdata;
-
- readwstype(&wstype);
- dev = readinteger("input device number ? ");
- pcreate_store(&err, &store);
- pinq_def_val_data3(wstype, dev, store, &err, &defval, &pets, &echo,
- &valdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "default valuator data 3:\n");
- phinprintf(PTKEINFORM, "initial value = ");
- writereal(PTKEINFORM, defval);
- phinprintf(PTKEINFORM, "prompt/echo types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, pets, PTKENOTABLE);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- /* write pet 1 data record */
- writevalrec3(PTKEINFORM, dev, 1, valdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_def_val_data3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinq_paths_descs()
- {
- Pint stid, depth, err, i, j;
- Ppath_order order;
- Pstore store;
- Pelem_ref_list_list *paths;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- order = readphigsenum(PTKEPATHORDER, "path order ? ");
- depth = readposinteger("path depth ? ");
- pcreate_store(&err, &store);
- pinq_paths_descs(stid, order, depth, store, &err, &paths);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "descendant paths of structure %d:\n", stid);
- for (i = 0; i < paths->num_elem_ref_lists; i++)
- {
- phinprintf(PTKEINFORM, "path %d:\n", i);
- for (j = 0; j < paths->elem_ref_lists[i].num_elem_refs; j++)
- {
- phinprintf(PTKEINFORM, "structure identifier = ");
- writeintvalue(PTKEINFORM,
- paths->elem_ref_lists[i].elem_refs[j].struct_id,
- PTKESTRUCTID);
- phinprintf(PTKEINFORM, "element number = ");
- writeinteger(PTKEINFORM,
- paths->elem_ref_lists[i].elem_refs[j].elem_pos);
- }
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinq_paths_descs */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqdisplayspacesize()
- {
- Pint wstype;
- Pint err;
- Pdisp_space_size size;
-
- readwstype(&wstype);
- pinq_disp_space_size(wstype, &err, &size);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "display space size:\n");
- phinprintf(PTKEINFORM, "device coordinate units = ");
- writephigsenum(PTKEINFORM, PTKEDEVUNITS, size.dc_units);
- phinprintf(PTKEINFORM, "device volume:\n");
- writefloatsize(PTKEINFORM, &size.size_dc);
- phinprintf(PTKEINFORM, "addressable units:\n");
- writeintsize(PTKEINFORM, &size.size_raster);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqdisplayspacesize */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqdisplayspacesize3()
- {
- Pint wstype;
- Pint err;
- Pdisp_space_size3 size;
-
- readwstype(&wstype);
- pinq_disp_space_size3(wstype, &err, &size);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "display space size:\n");
- phinprintf(PTKEINFORM, "device coordinate units = ");
- writephigsenum(PTKEINFORM, PTKEDEVUNITS, size.dc_units);
- phinprintf(PTKEINFORM, "device volume:\n");
- writefloatsize3(PTKEINFORM, &size.size_dc);
- phinprintf(PTKEINFORM, "addressable units:\n");
- writeintsize3(PTKEINFORM, &size.size_raster);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqdisplayspacesize */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqdisplayupdatest()
- {
- Pint wsid, err;
- Pdefer_mode defmode;
- Pmod_mode modmode;
- Pdisp_surf_empty dspsurf;
- Pvisual_st state;
-
- wsid = readinteger("workstation identifier ? ");
- pinq_disp_upd_st(wsid, &err, &defmode, &modmode, &dspsurf, &state);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current display update state:\n");
- phinprintf(PTKEINFORM, "deferral mode = ");
- writephigsenum(PTKEINFORM, PTKEDEFMODE, defmode);
- phinprintf(PTKEINFORM, "modification mode = ");
- writephigsenum(PTKEINFORM, PTKEMOD, modmode);
- phinprintf(PTKEINFORM, "display surface empty = ");
- writephigsenum(PTKEINFORM, PTKEDSPSURF, dspsurf);
- phinprintf(PTKEINFORM, "visual representation = ");
- writephigsenum(PTKEINFORM, PTKEVISUALREP, state);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqdisplayupdatest */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqdynstruct()
- {
- Pint wstype;
- Pint err;
- Pdyns_structs dynamics;
-
- readwstype(&wstype);
- pinq_dyns_structs(wstype, &err, &dynamics);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "structure dynamics:\n");
- phinprintf(PTKEINFORM, "content = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.content);
- phinprintf(PTKEINFORM, "post = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.post);
- phinprintf(PTKEINFORM, "unpost = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.unpost);
- phinprintf(PTKEINFORM, "delete = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, dynamics.del);
- phinprintf(PTKEINFORM, "reference = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE,
- dynamics.ref);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqdynstruct */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqdynwsattr()
- {
- Pint wstype;
- Pint err;
- Pdyns_ws_attrs attr;
-
- readwstype(&wstype);
- pinq_dyns_ws_attrs(wstype, &err, &attr);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "attribute dynamics:\n");
- phinprintf(PTKEINFORM, "line = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.line_bundle);
- phinprintf(PTKEINFORM, "marker = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.marker_bundle);
- phinprintf(PTKEINFORM, "text = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.text_bundle);
- phinprintf(PTKEINFORM, "interior = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.int_bundle);
- phinprintf(PTKEINFORM, "edge = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.edge_bundle);
- phinprintf(PTKEINFORM, "pattern = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.pat_rep);
- phinprintf(PTKEINFORM, "colour = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.colr_rep);
- phinprintf(PTKEINFORM, "view = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.view_rep);
- phinprintf(PTKEINFORM, "workstation transformation = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.ws_tran);
- phinprintf(PTKEINFORM, "highlighting = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.highl_filter);
- phinprintf(PTKEINFORM, "invisibility = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.invis_filter);
- phinprintf(PTKEINFORM, "hlhsr = ");
- writephigsenum(PTKEINFORM, PTKEMODTYPE, attr.hlhsr_mode);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqdynwsattr */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqedgefacil()
- {
- Pint wstype;
- Pint start, err, totlength, i;
- Pedge_facs facil;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_edge_facs(wstype, 0, start, &err, &facil, &totlength);
- facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
- facil.types.num_ints = totlength;
- pinq_edge_facs(wstype, totlength, start, &err, &facil, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "edge facilities:\n");
- phinprintf(PTKEINFORM, "edgetypes:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
- phinprintf(PTKEINFORM, "number of available widths = ");
- writeinteger(PTKEINFORM, facil.num_widths);
- phinprintf(PTKEINFORM, "nominal width = ");
- writereal(PTKEINFORM, facil.nom_width);
- phinprintf(PTKEINFORM, "minimum width = ");
- writereal(PTKEINFORM, facil.min_width);
- phinprintf(PTKEINFORM, "maximum width = ");
- writereal(PTKEINFORM, facil.max_width);
- phinprintf(PTKEINFORM, "number of predefined edge bundles = ");
- writeinteger(PTKEINFORM, facil.num_pred_inds);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(facil.types.ints);
- } /* do_pinqedgefacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqedgerep()
- {
- Pint wsid, err, totlength, index;
- Pinq_type type;
- Pedge_bundle rep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("edge index ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ?");
- pinq_edge_rep(wsid, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "edge representation:\n");
- writeedgebundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqedgerep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqeditmode()
- {
- Pint err;
- Pedit_mode mode;
-
- pinq_edit_mode(&err, &mode);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "edit mode = ");
- writephigsenum(PTKEINFORM, PTKEEDITMODE, mode);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqeditmode */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqelemcontent()
- {
- Pint stid, elptr, err;
- Pstore store;
- ptkselcontent elcont;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- elptr = readinteger("element pointer ? ");
- pcreate_store(&err, &store);
- ptk_inqelemtypesizecontent(stid, elptr, store, &err, &elcont);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n",
- phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "element content:\n");
- writeelemcontent(PTKEINFORM, &elcont);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqelemcontent */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqelemptr()
- {
- Pint elptr, err;
-
- pinq_elem_ptr(&err, &elptr);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n",
- phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current element pointer = ");
- writeinteger(PTKEINFORM, elptr);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqelemptr */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqelemtypesize()
- {
- Pint stid, elptr, err;
- Pelem_type eltype;
- size_t size;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- elptr = readinteger("element pointer ? ");
- pinq_elem_type_size(stid, elptr, &err, &eltype, &size);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "element type = ");
- writephigsenum(PTKEINFORM, PTKEELTYPE, eltype);
- phinprintf(PTKEINFORM, "element size = ");
- writeinteger(PTKEINFORM, size);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqelemtypesize */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqerrorhandmode()
- {
- Pint err;
- Perr_mode mode;
-
- pinq_err_hand_mode(&err, &mode);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "error mode = ");
- writephigsenum(PTKEINFORM, PTKEERRORMODE, mode);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqerrorhandmode */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqgdp()
- {
- Pint wstype;
- Pint gdp, err, numatts, i;
- Pattrs atts[5];
-
- readwstype(&wstype);
- gdp = readinteger("GDP identifier ? ");
- pinq_gdp(wstype, gdp, &err, &numatts, atts);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GDP attributes:\n");
- for (i = 0; i < numatts; i++)
- {
- phinprintf(PTKEINFORM, "attribute set = ");
- writephigsenum(PTKEINFORM, PTKEATTRS, atts[i]);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqgdp */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqgdp3()
- {
- Pint wstype;
- Pint gdp, err, numatts, i;
- Pattrs atts[5];
-
- readwstype(&wstype);
- gdp = readinteger("GDP identifier ? ");
- pinq_gdp3(wstype, gdp, &err, &numatts, atts);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GDP attributes:\n");
- for (i = 0; i < numatts; i++)
- {
- phinprintf(PTKEINFORM, "attribute set = ");
- writephigsenum(PTKEINFORM, PTKEATTRS, atts[i]);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqgdp3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqgsefacil()
- {
- Pint start, err, totlength, i;
- Pgse_id_dep_list gse;
-
- start = readposinteger("starting position ? ");
- pinq_gse_facs(0, start, &err, &gse, &totlength);
- gse.id_facs = (Pgse_id_dep *)calloc(totlength, sizeof(Pgse_id_dep));
- gse.num_id_facs = totlength;
- pinq_gse_facs(totlength, start, &err, &gse, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GSE facilities:\n");
- for (i = 0; i < gse.num_id_facs; i++)
- {
- phinprintf(PTKEINFORM, "GSE identifier [%d] = %d\n", i,
- gse.id_facs[i].id);
- phinprintf(PTKEINFORM, "workstation dependency indicator = ");
- writephigsenum(PTKEINFORM, PTKEWSDEP,
- gse.id_facs[i].ind);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(gse.id_facs);
- } /* do_pinqgsefacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqhilightfilter()
- {
- Pint wsid, err, i;
- Pfilter *highfilt;
- Pstore store;
-
- wsid = readinteger("workstation identifier ? ");
- pcreate_store(&err, &store);
- pinq_highl_filter(wsid, store, &err, &highfilt);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "inclusion set:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &highfilt->incl_set, PTKENAME);
- phinprintf(PTKEINFORM, "exclusion set:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &highfilt->excl_set, PTKENAME);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqhilightfilter */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqhlhsrfacil()
- {
- Pint wstype;
- Pint wsid, idstart, modestart, err, totidlen, totmodelen, i;
- Pint_list ids, modes;
-
- readwstype(&wstype);
- idstart = readposinteger("starting position in id list ? ");
- modestart = readposinteger("starting position in mode list ? ");
- pinq_hlhsr_mode_facs(wstype, 0, modestart, &err, &modes, &totmodelen);
- pinq_hlhsr_id_facs(wstype, 0, idstart, &err, &ids, &totidlen);
- ids.ints = (Pint *)calloc(totidlen, sizeof(Pint));
- modes.ints = (Pint *)calloc(totmodelen, sizeof(Pint));
- ids.num_ints = totidlen;
- modes.num_ints = totmodelen;
- pinq_hlhsr_mode_facs(wstype, totmodelen, modestart, &err,
- &modes, &totmodelen);
- pinq_hlhsr_id_facs(wstype, totidlen, idstart, &err, &ids, &totidlen);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "HLHSR identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &ids, PTKENOTABLE);
- phinprintf(PTKEINFORM, "HLHSR modes:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &modes, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(ids.ints);
- free(modes.ints);
- } /* do_pinqhlhsrfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqhlhsrmode()
- {
- Pint wsid, err, curmode, reqmode;
- Pupd_st state;
-
- wsid = readinteger("workstation identifier ? ");
- pinq_hlhsr_mode(wsid, &err, &state, &curmode, &reqmode);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "HLHSR update state = ");
- writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
- phinprintf(PTKEINFORM, "current HLHSR mode = ");
- writeinteger(PTKEINFORM, curmode);
- phinprintf(PTKEINFORM, "requested HLHSR mode = ");
- writeinteger(PTKEINFORM, reqmode);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqhlhsrmode */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqinputoverflow()
- {
- Pint err, wsid, dev;
- Pin_class class;
-
- pinq_in_overf(&err, &wsid, &class, &dev);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation identifier = ");
- writeinteger(PTKEINFORM, wsid);
- phinprintf(PTKEINFORM, "input class = ");
- writephigsenum(PTKEINFORM, PTKEICLASS, class);
- phinprintf(PTKEINFORM, "input device number = ");
- writeinteger(PTKEINFORM, dev);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqinputoverflow */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqintfacil()
- {
- Pint wstype;
- Pint hatstart, err, tothatlen, i;
- Pint_facs facil;
-
- readwstype(&wstype);
- hatstart = readposinteger("starting position in hatch list ? ");
- pinq_int_facs(wstype, 0, hatstart, &err, &facil, &tothatlen);
- facil.hatch_styles.ints = (Pint *)calloc(tothatlen, sizeof(Pint));
- facil.hatch_styles.num_ints = tothatlen;
- pinq_int_facs(wstype, tothatlen, hatstart, &err, &facil, &tothatlen);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "interior styles:\n");
- writeenumlist(PTKEINFORM, PTKEINTERSTYLE, facil.num_int_styles,
- facil.int_styles);
- phinprintf(PTKEINFORM, "hatch styles:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &facil.hatch_styles, PTKENOTABLE);
- phinprintf(PTKEINFORM, "number of predefined interior bundles = ");
- writeinteger(PTKEINFORM, facil.num_pred_inds);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(facil.hatch_styles.ints);
- } /* do_pinqintfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqintrep()
- {
- Pint wsid, index, err;
- Pinq_type type;
- Pint_bundle rep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("interior index ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pinq_int_rep(wsid, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "interior representation:\n");
- writeinterbundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqintrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqinvisfilter()
- {
- Pint wsid, err, i;
- Pfilter *highfilt;
- Pstore store;
-
- wsid = readinteger("workstation identifier ? ");
- pcreate_store(&err, &store);
- pinq_invis_filter(wsid, store, &err, &highfilt);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "inclusion set:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &highfilt->incl_set, PTKENAME);
- phinprintf(PTKEINFORM, "exclusion set:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &highfilt->excl_set, PTKENAME);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqinvisfilter */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqavailgdp()
- {
- Pint wstype;
- Pint start, err, totlen, i;
- Pint_list gdps;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_list_avail_gdp(wstype, 0, start, &err, &gdps, &totlen);
- gdps.num_ints = totlen;
- gdps.ints = (Pint *)calloc(totlen, sizeof(Pint));
- pinq_list_avail_gdp(wstype, totlen, start, &err, &gdps, &totlen);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GDP identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &gdps, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(gdps.ints);
- } /* do_pinqavailgdp */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqavailgdp3()
- {
- Pint wstype;
- Pint start, err, totlen, i;
- Pint_list gdps;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_list_avail_gdp3(wstype, 0, start, &err, &gdps, &totlen);
- gdps.num_ints = totlen;
- gdps.ints = (Pint *)calloc(totlen, sizeof(Pint));
- pinq_list_avail_gdp3(wstype, totlen, start, &err, &gdps, &totlen);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GDP identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &gdps, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(gdps.ints);
- } /* do_pinqavailgdp3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqgse()
- {
- Pint wstype;
- Pint start, err, totlen, i;
- Pint_list gses;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_list_avail_gse(wstype, 0, start, &err, &gses, &totlen);
- gses.ints = (Pint *)calloc(totlen, sizeof(Pint));
- pinq_list_avail_gse(wstype, totlen, start, &err, &gses, &totlen);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "GSE identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &gses, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(gses.ints);
- } /* do_pinqgse */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwstypes()
- {
- Pint err, totsize, start, i;
- Pint_list wslist;
-
- start = readposinteger("starting position ? ");
- pinq_list_avail_ws_types(0, start, &err, &wslist, &totsize);
- wslist.ints = (Pint *)calloc(totsize, sizeof(Pint));
- pinq_list_avail_ws_types(totsize, start, &err, &wslist, &totsize);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "available workstation types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &wslist, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(wslist.ints);
- } /* do_pinqwstypes */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqcolourind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_colr_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_colr_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "colours:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKECOLOURIND);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqcolourind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqedgeind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list edgeinds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_edge_inds(wsid, 0, start, &err, &edgeinds, &totlength);
- edgeinds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- edgeinds.num_ints = totlength;
- pinq_list_edge_inds(wsid, totlength, start, &err, &edgeinds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "edges:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &edgeinds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(edgeinds.ints);
- } /* do_pinqedgeind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqintind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_int_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_int_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "interiors:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqintind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpatind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_pat_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_pat_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "patterns:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- #endif
- } /* do_pinqpatind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqlineind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_line_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_line_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "lines:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqlineind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqmarkerind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_marker_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_marker_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "markers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqmarkerind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqtextind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_text_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_text_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "text:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqtextind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqviewind()
- {
- Pint wsid, start, err, totlength, i;
- Pint_list inds;
-
- wsid = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_list_view_inds(wsid, 0, start, &err, &inds, &totlength);
- inds.ints = (Pint *)calloc(totlength, sizeof(Pint));
- inds.num_ints = totlength;
- pinq_list_view_inds(wsid, totlength, start, &err, &inds, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "views:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &inds, PTKEVIEWIND);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(inds.ints);
- } /* do_pinqviewind */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqlinefacil()
- {
- Pint wstype;
- Pint start, err, totlength, i;
- Pline_facs facil;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_line_facs(wstype, 0, start, &err, &facil, &totlength);
- facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
- facil.types.num_ints = totlength;
- pinq_line_facs(wstype, totlength, start, &err, &facil, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "linetypes:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
- phinprintf(PTKEINFORM, "number of available widths = ");
- writeinteger(PTKEINFORM, facil.num_widths);
- phinprintf(PTKEINFORM, "nominal width = ");
- writereal(PTKEINFORM, facil.nom_width);
- phinprintf(PTKEINFORM, "minimum width = ");
- writereal(PTKEINFORM, facil.min_width);
- phinprintf(PTKEINFORM, "maximum width = ");
- writereal(PTKEINFORM, facil.max_width);
- phinprintf(PTKEINFORM, "number of predefined polyline bundles = ");
- writeinteger(PTKEINFORM, facil.num_pred_inds);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(facil.types.ints);
- } /* do_pinqlinefacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqlinerep()
- {
- Pint wsid, index, err;
- Pinq_type type;
- Pline_bundle rep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("line index ? ");
- type = readphigsenum(PTKEINQTYPE, "type of value ? ");
- pinq_line_rep(wsid, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "line representation:\n");
- writelnbundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqlinerep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqlocst()
- {
- Pint ws, dev, err, initview, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- Ppoint initpos;
- Pinq_type type;
- Plimit echo;
- Ploc_data *locdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("locator device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_loc_st(ws, dev, type, store, &err, &mode, &esw, &initview,
- &initpos, &pet, &echo, &locdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of locator device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial view index = ");
- writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
- /* Plocst contains a Ploc3 field - probably should be a Ploc
- ** field. DEC PHIGS error.
- */
- phinprintf(PTKEINFORM, "initial position:\n");
- writepoint3(PTKEINFORM, &initpos);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writelocrec(PTKEINFORM, dev, pet, locdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqlocst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqlocst3()
- {
- Pint ws, dev, err, initview, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- Ppoint3 initpos;
- Pinq_type type;
- Plimit3 echo;
- Ploc_data3 *locdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("locator device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_loc_st3(ws, dev, type, store, &err, &mode, &esw, &initview,
- &initpos, &pet, &echo, &locdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of locator 3 device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial view index = ");
- writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
- phinprintf(PTKEINFORM, "initial position:\n");
- writepoint3(PTKEINFORM, &initpos);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writelocrec3(PTKEINFORM, dev, pet, locdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqlocst3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqmarkerfacil()
- {
- Pint wstype, start, err, totlength, i;
- Pmarker_facs facil;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_marker_facs(wstype, 0, start, &err, &facil, &totlength);
- facil.types.ints = (Pint *)calloc(totlength, sizeof(Pint));
- pinq_marker_facs(wstype, totlength, start, &err, &facil, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "marker facilities:\n");
- phinprintf(PTKEINFORM, "marker types:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &facil.types, PTKENOTABLE);
- phinprintf(PTKEINFORM, "number of available sizes = ");
- writeinteger(PTKEINFORM, facil.num_sizes);
- phinprintf(PTKEINFORM, "nominal size = ");
- writereal(PTKEINFORM, facil.nom_size);
- phinprintf(PTKEINFORM, "minimum size = ");
- writereal(PTKEINFORM, facil.min_size);
- phinprintf(PTKEINFORM, "maximum size = ");
- writereal(PTKEINFORM, facil.max_size);
- phinprintf(PTKEINFORM, "number of predefined polymarker bundles = ");
- writeinteger(PTKEINFORM, facil.num_pred_inds);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(facil.types.ints);
- } /* do_pinqmarkerfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqmarkerrep()
- {
- Pint wsid, index, err;
- Pinq_type type;
- Pmarker_bundle rep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("marker index ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pinq_marker_rep(wsid, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "marker representation:\n");
- writemkbundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqmarkerrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqmodelclipfacil()
- {
- Pint start, err, totlength, num;
- Pint_list ops;
-
- start = readposinteger("starting position ? ");
- pinq_model_clip_facs(0, start, &err, &num, &ops, &totlength);
- ops.ints = (Pint *)calloc(totlength, sizeof(Pint));
- ops.num_ints = totlength;
- pinq_model_clip_facs(totlength, start, &err, &num, &ops, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM,
- "number of distinct planes in modelling clipping volume = ");
- writeinteger(PTKEINFORM, num);
- phinprintf(PTKEINFORM, "modelling clip operators:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &ops, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(ops.ints);
- } /* do_pinqmodelclipfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqmoreevents()
- {
- Pint err;
- Pmore_simult_events events;
-
- pinq_more_simult_events(&err, &events);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "simultaneous events = ");
- writephigsenum(PTKEINFORM, PTKESIMULTEV, events);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqmoreevents */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqnuminput()
- {
- Pint wstype;
- Pint err;
- Pnum_in numbers;
-
- readwstype(&wstype);
- pinq_num_avail_in(wstype, &err, &numbers);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "locator = ");
- writeinteger(PTKEINFORM, numbers.loc);
- phinprintf(PTKEINFORM, "stroke = ");
- writeinteger(PTKEINFORM, numbers.stroke);
- phinprintf(PTKEINFORM, "valuator = ");
- writeinteger(PTKEINFORM, numbers.val);
- phinprintf(PTKEINFORM, "choice = ");
- writeinteger(PTKEINFORM, numbers.choice);
- phinprintf(PTKEINFORM, "pick = ");
- writeinteger(PTKEINFORM, numbers.pick);
- phinprintf(PTKEINFORM, "string = ");
- writeinteger(PTKEINFORM, numbers.string);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqnuminput */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqnumdisplaypri()
- {
- Pint wstype;
- Pint err, numpri;
-
- readwstype(&wstype);
- pinq_num_disp_pris(wstype, &err, &numpri);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "number of display priorities = ");
- writeinteger(PTKEINFORM, numpri);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqnumdisplaypri */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqopenstruct()
- {
- Pint name, err;
- Popen_struct_status status;
-
- pinq_open_struct(&err, &status, &name);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "open structure status = ");
- writephigsenum(PTKEINFORM, PTKEOPENSTRUCTSTATUS, status);
- if (status == PSTRUCT_OPEN)
- {
- phinprintf(PTKEINFORM, "open structure = ");
- writeintvalue(PTKEINFORM, name, PTKESTRUCTID);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* pinq_open_struct */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpatfacil()
- {
- Pint wstype;
- Pint err, predefined;
-
- readwstype(&wstype);
- pinq_pat_facs(wstype, &err, &predefined);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM,
- "number of predefined pattern indices = ");
- writeinteger(PTKEINFORM, predefined);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpatfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpatrep()
- {
- Pint wsid, index, err, numcols, i;
- Pinq_type type;
- Ppat_rep *rep;
- Pstore store;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("pattern index ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_pat_rep(wsid, index, type, store, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "pattern representation:\n");
- phinprintf(PTKEINFORM, "dimensions, x = %d, y = %d\n",
- rep->dims.size_x, rep->dims.size_y);
- numcols = rep->dims.size_x * rep->dims.size_y;
- phinprintf(PTKEINFORM, "colour indices:\n");
- writeintarray(PTKEINFORM, numcols, rep->colr_array, PTKECOLOURIND);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- #endif
- } /* do_pinqpatrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqphigsfacil()
- {
- Pint start, err, openws, openar, numnames, normfilt, invfilt, totlength, i;
- Pint_list charsets;
-
- start = readposinteger("starting position ? ");
- pinq_phigs_facs(0, start, &err, &openws, &openar, &numnames, &charsets,
- &totlength, &normfilt, &invfilt);
- charsets.ints = (Pint *)calloc(totlength, sizeof(Pint));
- charsets.num_ints = totlength;
- pinq_phigs_facs(totlength, start, &err, &openws, &openar, &numnames,
- &charsets, &totlength, &normfilt, &invfilt);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "PHIGS facilities:\n");
- phinprintf(PTKEINFORM,
- "maximum number of simultaneously open workstations = ");
- writeinteger(PTKEINFORM, openws);
- phinprintf(PTKEINFORM,
- "maximum number of simultaneously open archive files = ");
- writeinteger(PTKEINFORM, openar);
- phinprintf(PTKEINFORM,
- "number of available names for namesets = ");
- writeinteger(PTKEINFORM, numnames);
- phinprintf(PTKEINFORM, "character sets:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &charsets, PTKENOTABLE);
- phinprintf(PTKEINFORM,
- "maximum length of normal filter list for ISS = ");
- writeinteger(PTKEINFORM, normfilt);
- phinprintf(PTKEINFORM,
- "maximum length of inverted filter list for ISS = ");
- writeinteger(PTKEINFORM, invfilt);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(charsets.ints);
- } /* do_pinqphigsfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpickst()
- {
- Pint ws, dev, err, i, pet;
- Pstore store;
- Pinq_type type;
- Pop_mode mode;
- Pecho_switch esw;
- Pfilter *pickfilt;
- Pin_status status;
- Ppick_path *initpick;
- Plimit echo;
- Ppick_data **pickdata;
- Ppath_order order;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("pick device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_pick_st(ws, dev, type, store, &err, &mode, &esw, &pickfilt,
- &status, &initpick, &pet, &echo, &pickdata, &order);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "pick device state:\n");
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "pick inclusion filter:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &pickfilt->incl_set, PTKENAME);
- phinprintf(PTKEINFORM, "pick exclusion filter:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &pickfilt->excl_set, PTKENAME);
- phinprintf(PTKEINFORM, "pick status = ");
- writephigsenum(PTKEINFORM, PTKEISTATUS, status);
- phinprintf(PTKEINFORM, "pick path:\n");
- writepickpath(PTKEINFORM, initpick);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writepickrec(PTKEINFORM, dev, pet, pickdata);
- phinprintf(PTKEINFORM, "path order = ");
- writephigsenum(PTKEINFORM, PTKEPATHORDER, order);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqpickst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpickst3()
- {
- Pint ws, dev, err, pet, i;
- Pstore store;
- Pinq_type type;
- Pop_mode mode;
- Pecho_switch esw;
- Pfilter *pickfilt;
- Pin_status status;
- Ppick_path *initpick;
- Plimit3 echo;
- Ppick_data3 **pickdata;
- Ppath_order order;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("pick device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_pick_st3(ws, dev, type, store, &err, &mode, &esw, &pickfilt,
- &status, &initpick, &pet, &echo, &pickdata, &order);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "pick inclusion filter:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &pickfilt->incl_set, PTKENAME);
- phinprintf(PTKEINFORM, "pick exclusion filter:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &pickfilt->excl_set, PTKENAME);
- phinprintf(PTKEINFORM, "pick status = ");
- writephigsenum(PTKEINFORM, PTKEISTATUS, status);
- phinprintf(PTKEINFORM, "pick path:\n");
- writepickpath(PTKEINFORM, initpick);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writepickrec3(PTKEINFORM, dev, pet, pickdata);
- phinprintf(PTKEINFORM, "path order = ");
- writephigsenum(PTKEINFORM, PTKEPATHORDER, order);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqpickst3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpostedstruct()
- {
- Pint ws, start, err, totlength, i;
- Pposted_struct_list list;
-
- ws = readinteger("workstation identifier ? ");
- start = readposinteger("starting position ? ");
- pinq_posted_structs(ws, 0, start, &err, &list, &totlength);
- list.postings = (Pposted_struct *)calloc(totlength, sizeof(Pposted_struct));
- list.num_postings = totlength;
- pinq_posted_structs(ws, totlength, start, &err, &list, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "number of posted structures = ");
- writeinteger(PTKEINFORM, list.num_postings);
- for (i = 0; i < list.num_postings; i++)
- {
- phinprintf(PTKEINFORM, "structure identifier = ");
- writeintvalue(PTKEINFORM, list.postings[i].id, PTKESTRUCTID);
- phinprintf(PTKEINFORM, "priority = %f\n", list.postings[i].disp_pri);
- }
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(list.postings);
- } /* do_pinqpostedstruct */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredcolourrep()
- {
- Pint wstype;
- Pint index, err;
- Pcolr_rep bundle;
-
- readwstype(&wstype);
- index = readposintvalue("predefined index ? ", PTKECOLOURIND);
- pinq_pred_colr_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM,
- "predefined colour representation:\n");
- writecobundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredcolourrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqprededgerep()
- {
- Pint wstype;
- Pint index, err;
- Pedge_bundle bundle;
-
- readwstype(&wstype);
- index = readposinteger("predefined index ? ");
- pinq_pred_edge_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined edge representation:\n");
- writeedgebundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqprededgerep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredintrep()
- {
- Pint wstype;
- Pint index, err;
- Pint_bundle bundle;
-
- readwstype(&wstype);
- index = readposinteger("predefined index ? ");
- pinq_pred_int_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM,
- "predefined interior representation:\n");
- writeinterbundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredintrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredpatrep()
- {
- Pint wstype, index, err, numcols, i;
- Ppat_rep *rep;
- Pstore store;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- readwstype(&wstype);
- index = readposinteger("pattern index ? ");
- pcreate_store(&err, &store);
- pinq_pred_pat_rep(wstype, index, store, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined pattern representation:\n");
- phinprintf(PTKEINFORM, "dimensions, x = %d, y = %d\n",
- rep->dims.size_x, rep->dims.size_y);
- numcols = rep->dims.size_x * rep->dims.size_y;
- phinprintf(PTKEINFORM, "colour indices:\n");
- writeintarray(PTKEINFORM, numcols, rep->colr_array, PTKECOLOURIND);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- #endif
- } /* do_pinqpredpatrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredlinerep()
- {
- Pint wstype;
- Pint index, err;
- Pline_bundle bundle;
-
- readwstype(&wstype);
- index = readposinteger("predefined index ? ");
- pinq_pred_line_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined line representation:\n");
- writelnbundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredlinerep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredmarkerrep()
- {
- Pint wstype;
- Pint index, err;
- Pmarker_bundle bundle;
-
- readwstype(&wstype);
- index = readposinteger("predefined index ? ");
- pinq_pred_marker_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined marker representation:\n");
- writemkbundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredmarkerrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredtextrep()
- {
- Pint wstype;
- Pint index, err;
- Ptext_bundle bundle;
-
- readwstype(&wstype);
- index = readposinteger("predefined index ? ");
- pinq_pred_text_rep(wstype, index, &err, &bundle);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined text representation:\n");
- writetxbundl(PTKEINFORM, &bundle);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredtextrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqpredviewrep()
- {
- Pint wstype;
- Pint index, err;
- Pview_rep3 rep;
-
- readwstype(&wstype);
- index = readposintvalue("predefined index ? ", PTKEVIEWIND);
- pinq_pred_view_rep(wstype, index, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "predefined view representation:\n");
- phinprintf(PTKEINFORM, "orientation matrix:\n");
- writematrix3(PTKEINFORM, rep.ori_matrix);
- phinprintf(PTKEINFORM, "mapping matrix:\n");
- writematrix3(PTKEINFORM, rep.map_matrix);
- phinprintf(PTKEINFORM, "clipping limits:\n");
- writelimit3(PTKEINFORM, &rep.clip_limit);
- phinprintf(PTKEINFORM, "x-y clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, rep.xy_clip);
- phinprintf(PTKEINFORM, "back clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, rep.back_clip);
- phinprintf(PTKEINFORM, "front clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, rep.front_clip);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqpredviewrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqsetopenws()
- {
- Pint start, err, totlength, i;
- Pint_list wsids;
-
- start = readposinteger("starting position ? ");
- pinq_open_wss(0, start, &err, &wsids, &totlength);
- wsids.ints = (Pint *)calloc(totlength, sizeof(Pint));
- wsids.num_ints = totlength;
- pinq_open_wss(totlength, start, &err, &wsids, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "open workstations:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &wsids, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(wsids.ints);
- } /* do_pinqsetopenws */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqsetwsposted()
- {
- Pint stid, start, err, totlength, i;
- Pint_list wsids;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- start = readposinteger("starting position ? ");
- pinq_wss_posted(stid, 0, start, &err, &wsids, &totlength);
- wsids.ints = (Pint *)calloc(totlength, sizeof(Pint));
- wsids.num_ints = totlength;
- pinq_wss_posted(stid, totlength, start, &err, &wsids, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &wsids, PTKENOTABLE);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(wsids.ints);
- } /* do_pinqsetwsposted */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstringst()
- {
- Pint ws, dev, err, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- char *initstr;
- Plimit echo;
- Pstring_data *strdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("string device number ? ");
- pcreate_store(&err, &store);
- pinq_string_st(ws, dev, store, &err, &mode, &esw, &initstr, &pet, &echo,
- &strdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of string device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial string = \"%s\"\n", initstr);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writestringrec(PTKEINFORM, dev, pet, strdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqstringst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstringst3()
- {
- Pint ws, dev, err, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- char *initstr;
- Plimit3 echo;
- Pstring_data3 *strdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("string device number ? ");
- pcreate_store(&err, &store);
- pinq_string_st3(ws, dev, store, &err, &mode, &esw, &initstr, &pet,
- &echo, &strdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of string 3 device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial string = \"%s\"\n", initstr);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writestringrec3(PTKEINFORM, dev, pet, strdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqstringst3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstrokest()
- {
- Pint ws, dev, err, initview, i, pet;
- Pinq_type type;
- Pop_mode mode;
- Pecho_switch esw;
- Ppoint_list *initpts;
- Plimit echo;
- Pstroke_data *strokedata;
- Pstore store;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("stroke device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_stroke_st(ws, dev, type, store, &err, &mode, &esw, &initview,
- &initpts, &pet, &echo, &strokedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of stroke device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial view index = ");
- writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
- phinprintf(PTKEINFORM, "points:\n");
- writepointarray(PTKEINFORM, initpts->num_points, initpts->points);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writestrokerec(PTKEINFORM, dev, pet, strokedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqstrokest */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstrokest3()
- {
- Pint ws, dev, err, i, initview, pet;
- Pinq_type type;
- Pop_mode mode;
- Pecho_switch esw;
- Ppoint_list3 *initpts;
- Plimit3 echo;
- Pstroke_data3 *strokedata;
- Pstore store;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("stroke device number ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pcreate_store(&err, &store);
- pinq_stroke_st3(ws, dev, type, store, &err, &mode, &esw, &initview,
- &initpts, &pet, &echo, &strokedata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of stroke 3 device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial view index = ");
- writeintvalue(PTKEINFORM, initview, PTKEVIEWIND);
- phinprintf(PTKEINFORM, "points:\n");
- writepointarray3(PTKEINFORM, initpts->num_points, initpts->points);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writestrokerec3(PTKEINFORM, dev, pet, strokedata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqstrokest3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstructids()
- /* crashes in DEC PHIGS if there are no structures */
- {
- Pint start, err, totlength, i;
- Pint_list stids;
-
- start = readposinteger("starting position ? ");
- pinq_struct_ids(0, start, &err, &stids, &totlength);
- stids.ints = (Pint *)calloc(totlength, sizeof(Pint));
- stids.num_ints = totlength;
- pinq_struct_ids(totlength, start, &err, &stids, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "structure identifiers:\n");
- phinprintf(PTKEINFORM, "number = ");
- writeintlst(PTKEINFORM, &stids, PTKESTRUCTID);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(stids.ints);
- } /* do_pinqstructids */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstructst()
- {
- Pstruct_st state;
-
- pinq_struct_st(&state);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- phinprintf(PTKEINFORM, "structure state value = ");
- writephigsenum(PTKEINFORM, PTKESTRUCTSTATE, state);
- }
- } /* do_pinqstructst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqstructstatus()
- {
- Pint stid, err;
- Pstruct_status status;
-
- stid = readintvalue("structure identifier ? ", PTKESTRUCTID);
- pinq_struct_status(stid, &err, &status);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "structure status = ");
- writephigsenum(PTKEINFORM, PTKESTRUCTSTATUS, status);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqstructstatus */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqsystemst()
- {
- Psys_st state;
-
- pinq_sys_st(&state);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- phinprintf(PTKEINFORM, "system state value = ");
- writephigsenum(PTKEINFORM, PTKESYSTEMSTATE, state);
- }
- } /* do_pinqsystemst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqtextextent()
- {
- Pint wstype;
- Pint font, err;
- Pfloat expan, space, height;
- Ptext_path path;
- Ptext_align align;
- char str[255];
- Prect rect;
- Ppoint offset;
-
- #ifdef HP
- phintererror(1, (char *)NULL, INFORM);
- #else
- readwstype(&wstype);
- font = readinteger("text font ? ");
- expan = readreal("character expansion ? ");
- space = readreal("character spacing ? ");
- height = readreal("character height ? ");
- path = readphigsenum(PTKETXPATH, "text path ? ");
- align.hor = readphigsenum(PTKETXHOR, "horizontal alignment ? ");
- align.vert = readphigsenum(PTKETXVER, "vertical alignment ? ");
- readstring(str, "text string ? ");
- pinq_text_extent(wstype, font, expan, space, height, path, align.hor,
- align.vert, str, &err, &rect, &offset);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "text extent rectangle:\n");
- phinprintf(PTKEINFORM, "lower left:\n");
- writepoint(PTKEINFORM, &rect.p);
- phinprintf(PTKEINFORM, "upper right:\n");
- writepoint(PTKEINFORM, &rect.q);
- phinprintf(PTKEINFORM, "concatenation offset:\n");
- writepoint(PTKEINFORM, &offset);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- #endif
- } /* do_pinqtextextent */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqtextfacil()
- {
- Pint wstype, start, err, totlength, i;
- Ptext_facs facil;
-
- readwstype(&wstype);
- start = readposinteger("starting position ? ");
- pinq_text_facs(wstype, 0, start, &err, &facil, &totlength);
- facil.font_precs = (Ptext_font_prec *)calloc(totlength,
- sizeof(Ptext_font_prec));
- pinq_text_facs(wstype, totlength, start, &err, &facil, &totlength);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "text facilities:\n");
- for (i = 0; i < facil.num_font_precs; i++)
- {
- phinprintf(PTKEINFORM, "font [%d] = %d\n", i,
- facil.font_precs[i].font);
- phinprintf(PTKEINFORM, "precision = ");
- writephigsenum(PTKEINFORM, PTKETXPREC, facil.font_precs[i].prec);
- }
- phinprintf(PTKEINFORM, "number of character heights = ");
- writeinteger(PTKEINFORM, facil.num_char_hts);
- phinprintf(PTKEINFORM, "minimum height = ");
- writereal(PTKEINFORM, facil.min_char_ht);
- phinprintf(PTKEINFORM, "maximum height = ");
- writereal(PTKEINFORM, facil.max_char_ht);
- phinprintf(PTKEINFORM, "number of character expansions = ");
- writeinteger(PTKEINFORM, facil.num_char_expans);
- phinprintf(PTKEINFORM, "minimum expansion = ");
- writereal(PTKEINFORM, facil.min_char_expan);
- phinprintf(PTKEINFORM, "maximum expansion = ");
- writereal(PTKEINFORM, facil.max_char_expan);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- free(facil.font_precs);
- } /* do_pinqtextfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqtextrep()
- {
- Pint wsid, index, err;
- Pinq_type type;
- Ptext_bundle rep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposinteger("text index ? ");
- type = readphigsenum(PTKEINQTYPE, "inquire type ? ");
- pinq_text_rep(wsid, index, type, &err, &rep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "text representation:\n");
- writetxbundl(PTKEINFORM, &rep);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqtextrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqvalst()
- {
- Pint ws, dev, err, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- Pfloat initval;
- Plimit echo;
- Pval_data *valdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("valuator device number ? ");
- pcreate_store(&err, &store);
- pinq_val_st(ws, dev, store, &err, &mode, &esw, &initval, &pet,
- &echo, &valdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of valuator device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial value = ");
- writereal(PTKEINFORM, initval);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit(PTKEINFORM, &echo);
- writevalrec(PTKEINFORM, dev, pet, valdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqvalst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqvalst3()
- {
- Pint ws, dev, err, pet;
- Pstore store;
- Pop_mode mode;
- Pecho_switch esw;
- Pfloat initval;
- Plimit3 echo;
- Pval_data3 *valdata;
-
- ws = readinteger("workstation identifier ? ");
- dev = readinteger("valuator device number ? ");
- pcreate_store(&err, &store);
- pinq_val_st3(ws, dev, store, &err, &mode, &esw, &initval, &pet,
- &echo, &valdata);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "current state of valuator 3 device %d:\n", dev);
- phinprintf(PTKEINFORM, "operating mode = ");
- writephigsenum(PTKEINFORM, PTKEIMODE, mode);
- phinprintf(PTKEINFORM, "echo switch = ");
- writephigsenum(PTKEINFORM, PTKEESW, esw);
- phinprintf(PTKEINFORM, "initial value = ");
- writereal(PTKEINFORM, initval);
- phinprintf(PTKEINFORM, "prompt/echo type = ");
- writeinteger(PTKEINFORM, pet);
- phinprintf(PTKEINFORM, "echo limits:\n");
- writelimit3(PTKEINFORM, &echo);
- writevalrec3(PTKEINFORM, dev, pet, valdata);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- ptk_delstore(store);
- } /* do_pinqvalst3 */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqviewfacil()
- {
- Pint wstype;
- Pint err, num;
-
- readwstype(&wstype);
- pinq_view_facs(wstype, &err, &num);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "number of predefined view indices:\n");
- writeinteger(PTKEINFORM, num);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqviewfacil */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqviewrep()
- {
- Pint wsid, index, err;
- Pupd_st state;
- Pview_rep3 currep, reqrep;
-
- wsid = readinteger("workstation identifier ? ");
- index = readposintvalue("view index ? ", PTKEVIEWIND);
- pinq_view_rep(wsid, index, &err, &state, &currep, &reqrep);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "view representation:\n");
- phinprintf(PTKEINFORM, "transformation update state = ");
- writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
- phinprintf(PTKEINFORM, "current orientation matrix:\n");
- writematrix3(PTKEINFORM, currep.ori_matrix);
- phinprintf(PTKEINFORM, "current mapping matrix:\n");
- writematrix3(PTKEINFORM, currep.map_matrix);
- phinprintf(PTKEINFORM, "current clipping limits:\n");
- writelimit3(PTKEINFORM, &currep.clip_limit);
- phinprintf(PTKEINFORM, "current x-y clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, currep.xy_clip);
- phinprintf(PTKEINFORM, "current back clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, currep.back_clip);
- phinprintf(PTKEINFORM, "current front clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, currep.front_clip);
- phinprintf(PTKEINFORM, "requested orientation matrix:\n");
- writematrix3(PTKEINFORM, reqrep.ori_matrix);
- phinprintf(PTKEINFORM, "requested mapping matrix:\n");
- writematrix3(PTKEINFORM, reqrep.map_matrix);
- phinprintf(PTKEINFORM, "requested clipping limits:\n");
- writelimit3(PTKEINFORM, &reqrep.clip_limit);
- phinprintf(PTKEINFORM, "requested x-y clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, reqrep.xy_clip);
- phinprintf(PTKEINFORM, "requested back clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, reqrep.back_clip);
- phinprintf(PTKEINFORM, "requested front clipping = ");
- writephigsenum(PTKEINFORM, PTKECLIP, reqrep.front_clip);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqviewrep */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwscategory()
- {
- Pint wstype;
- Pint err;
- Pws_cat category;
-
- readwstype(&wstype);
- pinq_ws_cat(wstype, &err, &category);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation category = ");
- writephigsenum(PTKEINFORM, PTKEWSCAT, category);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqwscategory */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwsclass()
- {
- Pint wstype;
- Pint err;
- Pws_class class;
-
- readwstype(&wstype);
- pinq_ws_class(wstype, &err, &class);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation class = ");
- writephigsenum(PTKEINFORM, PTKEWSCLASS, class);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqwsclass */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwsconntype()
- {
- Pint wsid, err, wstype;
- Pstore store;
- void *connid;
-
- wsid = readinteger("workstation identifier ? ");
- pcreate_store(&err, &store);
- pinq_ws_conn_type(wsid, store, &err, &connid, &wstype);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "connection identifier = %s\n",
- (char *)connid);
- phinprintf(PTKEINFORM, "workstation type = ");
- writeinteger(PTKEINFORM, wstype);
- wst = wstype;
- ptk_delstore(wststore);
- wststore = store;
- }
- else
- {
- phigserror(PTKEINFORM, err);
- ptk_delstore(store);
- }
- }
- } /* do_pinqwsconntype */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwsst()
- {
- Pws_st state;
-
- pinq_ws_st(&state);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- phinprintf(PTKEINFORM, "workstation state value = ");
- writephigsenum(PTKEINFORM, PTKEWSSTATE, state);
- }
- } /* do_pinqwsst */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwssttable()
- {
- Pint wstype;
- Pint err;
- Pws_st_tables lengths;
-
- readwstype(&wstype);
- pinq_ws_st_table(wstype, &err, &lengths);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "lengths of workstation state tables:\n");
- phinprintf(PTKEINFORM, "line = ");
- writeinteger(PTKEINFORM, lengths.line_bundles);
- phinprintf(PTKEINFORM, "marker = ");
- writeinteger(PTKEINFORM, lengths.mark_bundles);
- phinprintf(PTKEINFORM, "text = ");
- writeinteger(PTKEINFORM, lengths.text_bundles);
- phinprintf(PTKEINFORM, "interior = ");
- writeinteger(PTKEINFORM, lengths.int_bundles);
- phinprintf(PTKEINFORM, "edge = ");
- writeinteger(PTKEINFORM, lengths.edge_bundles);
- phinprintf(PTKEINFORM, "pattern = ");
- writeinteger(PTKEINFORM, lengths.pat_reps);
- phinprintf(PTKEINFORM, "colour = ");
- writeinteger(PTKEINFORM, lengths.colr_reps);
- phinprintf(PTKEINFORM, "view = ");
- writeinteger(PTKEINFORM, lengths.view_reps);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqwssttable */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwstran()
- {
- Pint wsid, err;
- Pupd_st state;
- Plimit reqwindow, curwindow, reqviewport, curviewport;
-
- wsid = readinteger("workstation identifier ? ");
- pinq_ws_tran(wsid, &err, &state, &reqwindow, &curwindow, &reqviewport,
- &curviewport);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation transformation:\n");
- phinprintf(PTKEINFORM, "update state = ");
- writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
- phinprintf(PTKEINFORM, "requested workstation window:\n");
- writelimit(PTKEINFORM, &reqwindow);
- phinprintf(PTKEINFORM, "current workstation window:\n");
- writelimit(PTKEINFORM, &curwindow);
- phinprintf(PTKEINFORM, "requested workstation viewport:\n");
- writelimit(PTKEINFORM, &reqviewport);
- phinprintf(PTKEINFORM, "current workstation viewport:\n");
- writelimit(PTKEINFORM, &curviewport);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqwstran */
-
- /*--------------------------------------------------------------------------*/
-
- static void do_pinqwstran3()
- {
- Pint wsid, err;
- Pupd_st state;
- Plimit3 reqwindow, curwindow, reqviewport, curviewport;
-
- wsid = readinteger("workstation identifier ? ");
- pinq_ws_tran3(wsid, &err, &state, &reqwindow, &curwindow, &reqviewport,
- &curviewport);
- if (writeinform)
- {
- phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist[activefunction]);
- if (err == 0)
- {
- phinprintf(PTKEINFORM, "workstation transformation:\n");
- phinprintf(PTKEINFORM, "update state = ");
- writephigsenum(PTKEINFORM, PTKEUPDATEST, state);
- phinprintf(PTKEINFORM, "requested workstation window:\n");
- writelimit3(PTKEINFORM, &reqwindow);
- phinprintf(PTKEINFORM, "current workstation window:\n");
- writelimit3(PTKEINFORM, &curwindow);
- phinprintf(PTKEINFORM, "requested workstation viewport:\n");
- writelimit3(PTKEINFORM, &reqviewport);
- phinprintf(PTKEINFORM, "current workstation viewport:\n");
- writelimit3(PTKEINFORM, &curviewport);
- }
- else
- phigserror(PTKEINFORM, err);
- }
- } /* do_pinqwstran3 */
-
- /*--------------------------------------------------------------------------*/
-
- /* end of pinqfns.c */
-